From: Keir Fraser Date: Thu, 8 May 2008 12:14:27 +0000 (+0100) Subject: minios: fix and enforce block_domain atomicity X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14215^2~45 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=5991224aff6747d3d50e83da00659a0a277c9cc0;p=xen.git minios: fix and enforce block_domain atomicity To ensure that the timer event is not lost, block_domain requires that event delivery is disabled. SCHEDOP_block re-enables them, so for coherency (and fixing a bug actually), we should re-disable them after. Also, make sure that the caller disabled them. Signed-off-by: Samuel Thibault --- diff --git a/extras/mini-os/arch/x86/time.c b/extras/mini-os/arch/x86/time.c index a396dc279f..d7b387f95f 100644 --- a/extras/mini-os/arch/x86/time.c +++ b/extras/mini-os/arch/x86/time.c @@ -201,10 +201,12 @@ void block_domain(s_time_t until) { struct timeval tv; gettimeofday(&tv, NULL); + ASSERT(irqs_disabled()); if(monotonic_clock() < until) { HYPERVISOR_set_timer_op(until); HYPERVISOR_sched_op(SCHEDOP_block, 0); + local_irq_disable(); } }